package com.sjd.mall.mapper;

import com.sjd.mall.domain.SjdGoodsDiscountDO;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author s
 */
public interface SjdGoodsDiscountMapper {
    /**
     * 删除
     * @param goodsDiscountId goodsDiscountId
     * @return return
     */
    int deleteByMemberLevel(Integer goodsDiscountId);

    /**
     * 添加
     * @param record record
     * @return return
     */
    int insert(SjdGoodsDiscountDO record);

    /**
     * 根据查询
     * @param goodsDiscountId goodsDiscountId
     * @return return
     */
    BigDecimal getDiscountByMemberLevel(Integer goodsDiscountId);

    /**
     * 更新
     * @param  record record
     * @return return
     */
    int updateByMemberLevel(SjdGoodsDiscountDO record);

    /**
     * 获取可用折扣
     * @return return
     */
    List<SjdGoodsDiscountDO> getEnableGoodsDiscount();
}